The present invention relates to an image synthesizing system or method. More particularly, the present invention is related to an image synthesizing system or method wherein a main image compressed in a MPEG (Moving Picture Expert Group) mode is decoded and then the decoded main image is synthesized with a sub-image compressed in a run-length mode.
FIG. 8 illustrates a conventional image synthesizing system. Referring to FIG. 8, a storage unit 200 stores multiple data, including main image data compressed and decoded in the MPEG mode, and sub-image data compressed and decoded in the run-length mode and representing still images such as movie or karaoke subtitles
The storage unit 200 is connected to a data separator 210. The data separator 210 separates compressed main image data and compressed sub-image data each read out of the storage unit 200.
The data separator 210 is connected to a main image decoder 220 and to a sub-image decoder 230. The main image decoder 220 receives compressed main image data from the data separator 210. The sub-image decoder 230 receives compressed sub-image data from the data separator 210.
The main image decoder 220 decodes image data compressed and encoded in the MPEG mode.
The sub-image decoder 230 decodes sub-image data compressed and encoded in the run-length mode.
A main image frame buffer 240 is connected to the main image decoder 220. The main image frame buffer 240 is a frame memory that stores previous frame images from the main image decoder 220. Content is taken out of the frame buffer in accordance with motion position information. A predictive error is added to the content to obtain a reconstructed image. The reconstructed image is stored in the frame buffer to use as a predictive image for the next frame.
The main image frame buffer 240 alpha-blends the image reconstructed by the main image decoder 220 with the reconstructed image decoded by the sub-image decoder 230.
However, the above-mentioned image synthesizing system suffers from image deterioration because a predictive image to be used for the next frame by the main image decoder 220 has already been subjected to a synthesizing process.
In the above explanation, the decoding process of each of the main image decoder 220 and the sub-image decoder 230 and the synthesizing process are performed by software. In some cases, decoding functions may be performed by signal processing hardware. However, there remains the problem that a personal computer cannot perform the alpha blending process because the burden on the main frame buffer 240 is heavy when sub-images are written at video clock rates.
The present invention is made to solve the above-mentioned problems.
Moreover, the objective of the invention is to provide an image synthesizing system that can synthesize a main image obtained in an MPEG decoding process with a sub-image obtained in a run-length decoding process, without image deterioration, and can relieve the burden on the frame buffer in the synthesizing operation.
Another object of the present invention is to provide an image synthesizing system that can synthesize a main image obtained in an MPEG decoding process with a sub-image obtained in a run-length decoding process, without image deterioration, and can relieve the burden on the frame buffer of performing the synthesizing operation.
The objective of the present invention is achieved by an image synthesizing system, in which frames of a main image and a sub-image, that are compressed in different modes are decoded and synthesized. The system comprises a main image frame buffer for storing the main image to be decoded and referred to in the next frame decoding process. An alpha blending section alpha-blends a main image from the main image frame buffer with a decoded sub-image to produce a translucent composite image. Then, an image synthesis and display section superimposes the translucent composite image produced by the alpha blending section on the main image.
Preferably, the main image is compressed in MPEG (Moving Picture coding Experts Group) mode and the sub-image is compressed in a run-length mode.
The above configuration allows the main image frame buffer to be used as a reference in the decoding process, thus preventing deterioration of images. Conventionally, MPEG images are decoded with reference to the next frame and the preceding frame. According to the present invention, the main image frame buffer 122 is used for storing reference frames and is not used for the alpha-blending operation.
Preferably, the alpha blending section alpha-blends the sub-image with a section of the main image to produce a translucent composite image. Each pixel of the sub-image is blended with a corresponding pixel of the main image in accordance with a ratio represented by the pixel data of the sub-image. The alpha-blending section uses a color table having colors designated by index values, and represents each pixel of the composite image with an index value. An image synthesis and display section superimposes the translucent composite image on the corresponding main image from the main image frame buffer, without performing the alpha blending operation. This means that the burden for processing is light.
Preferably, the sub-image is a still image, such as movie or karaoke subtitles. The sub-image size is small enough for the translucent image synthesis to be performed by the alpha blending section 133. Since small sub-images such as subtitles require a small amount of processing and the alpha blending section 133 performs calculations only for the translucent pixels of the sub-image, no calculation is needed for pixels other than those to which the sub-image is applied translucently. The image synthesis and display section does not require special hardware or a high clock rate and merely performs a superimposing operation. Therefore, personal computers can be utilized for this function.
Moreover, according to the present invention, an image synthesizing system decodes and synthesizes a main image and a sub-image that are compressed in different modes. The system includes a main image decoder for decoding a main image and a main image frame buffer for storing main images decoded by the main image decoder and referred to in decoding of subsequent frames. A sub-image decoder decodes sub-images, and a sub-image frame buffer stores sub-image frames decoded by the sub-image decoder. An alpha blending section alpha-blends the main image frame from the main image frame buffer with the sub-image frame from the sub-image frame buffer to produce a translucent composite image. A composite image frame buffer stores the composite image synthesized by the alpha blending section, and an image synthesis and display section superimposes the translucent composite image on the main image from the main image frame buffer.
The above configuration allows the main image frame buffer to be used as a reference in the decoding process. Hence, the image deterioration can be prevented and the functions can be performed on a personal computer.
Furthermore, in an image synthesis method according to the present invention, a main image and a sub-image that are compressed in different modes are decoded and synthesized. A main image from a main image frame buffer is alpha-blended with a decoded sub-image to produce a translucent composite image. The translucent composite image is then superimposed on the main image.
The above method allows the main image frame buffer to be used as a reference in the decoding process. As a result, the image deterioration can be prevented and the functions can be performed by a personal computer.
Preferably, the main image is compressed in the MPEG mode and the sub-image is compressed in the run-length mode.
The alpha blending step is preferably executed for a part of the main image that is the size of the sub-image.
Moreover, it is desirable that alpha blending comprises synthesizing pixels of the sub-image with corresponding pixels of the main image in accordance with a ratio represented by the data of the pixel of the sub-image. The pixels of the composite image is preferably represented by index values corresponding to colors in a color table.